
<style>
	th {
		text-align: center;
	}
	
	.table>tbody>tr>td {
		line-height: 60px;
		text-align: center;
		height: 50px;
		margin: 0px;
	}
</style>
<div id="data_page" class="in_page">
	<div class="panel panel-default">
		<div class="panel-body">
			<form class="form-inline" action="{:U('Bbs/index')}" method="get" name="keyword" id="keyword">
				<div class="form-group">
				<input type="text" class="form-control" id="exampleInputName2" name="key" placeholder="标题">
				</div>
				<button type="submit" class="btn btn-sm btn-default">搜索</button>
				<!--<div class="form-group">
					<button type="button" class="btn btn-sm btn-primary ">添加项目</button>
					<button type="button" class="btn btn-sm btn-primary ">列表轮播图管理</button>
				</div>-->
			</form>
		</div>
	</div>
	<table class="table table-striped table-bordered table-condensed  ">
		 <thead>
			<tr>
				<th>板块</th>
				<th>用户</th>
				<th>标题</th>
				<th>发帖时间</th>
				<th>点赞数</th>
				<th>评论</th>
				<th>操作</th>
	
			</tr>
		</thead>
		<tbody>
			<volist name="list" id="li">
				<tr>
					<td >{$li.category} </td>
					<td >{$li.nickname} </td>
					<td>{$li.title}</td>
					<td><?php echo date('Y-m-d H:i:s',$li['ctime']) ?></td>
					<td>{$li.zan}</td>
					<td>
						<a href="{:U('Bbs/manage')}?id={$li.id}"><button type="button" class="btn btn-sm btn-primary">管理</button></a>
					</td>
					<td>
						<button type="button" class="btn btn-sm btn-danger delete"   d_id="{$li.id}">删除</button>
					</td>
				</tr>
			</volist>
		</tbody>
	</table>
</div>
<div class="pagelist">{$page}</div>
<style>
.pagelist{ text-align:right; background:#f1f1f1; padding:7px 0;}
.pagelist a{ margin:0 5px; border:#6185a2 solid 1px; display:inline-block; padding:2px 6px 1px; line-height:16px; background:#fff; color:#6185a2;}
.pagelist span{ margin:0 5px; border:#6185a2 solid 1px; display:inline-block; padding:2px 6px 1px; line-height:16px; color:#6185a2; color:#fff; background:#6185a2;}
.trr td{height: 50px; line-height: 50px}
</style>    

<script>
	$(function(){
			$('.delete').click(function(){
				
				$_this = $(this);
				if(confirm('确认删除吗?')){
					var url = "{:U('Bbs/del')}?id="+$(this).attr("d_id");
					$.get(url,function(obj){
						if(obj.s){
							location.reload();
						}
					});

				}
				return false;
			})
	})

</script>